﻿using System;
using System.Collections.Generic;
using System.Text;
using BCCommon.Enums;
using BCCommon.Extensions;
using BCCommon.PaymentEnums;

namespace BCDto.Common.Payment.PaymentRecord
{
    /// <summary>
    /// 支付记录模型
    /// </summary>
    public class PaymentRecordDto
    {
        /// <summary>
        /// 支付记录Id
        /// </summary>
        public long PaymentRecordId { get; set; }
        /// <summary>
        /// 支付渠道编码
        /// </summary>
        public PaymentChannelType PaymentChannelId { get; set; }
        /// <summary>
        /// 支付渠道
        /// </summary>
        public string PaymentChannelStr
        {
            get
            {
                return this.PaymentChannelId.GetDisplayString();
            }
        }
        /// <summary>
        /// 订单类型
        /// </summary>
        public FlowType OrderType { get; set; }
        /// <summary>
        /// 订单类型
        /// </summary>
        public string OrderTypeStr
        {
            get
            {
                return this.OrderType.GetDisplayString();
            }
        }
        /// <summary>
        /// 订单编号
        /// </summary>
        public string ReferenceNumber { get; set; }
        /// <summary>
        /// 支付金额
        /// </summary>
        public decimal Amount { get; set; }
        /// <summary>
        /// 用户Id
        /// </summary>
        public long? UserId { get; set; }
        /// <summary>
        /// 支付状态
        /// </summary>
        public PaymentResultType Status { get; set; }
        /// <summary>
        /// 支付状态
        /// </summary>
        public string StatusStr
        {
            get
            {
                return this.Status.GetDisplayString();
            }
        }
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime { get; set; }
        /// <summary>
        /// 支付成功时间
        /// </summary>
        public DateTime? SuccessTime { get; set; }
        /// <summary>
        /// 对账时间
        /// </summary>
        public DateTime? ReconciliationTime { get; set; }
        /// <summary>
        /// 已结算
        /// </summary>
        public bool? IsSettled { get; set; }
        /// <summary>
        /// 结算日期
        /// </summary>
        public DateTime? SettleDate { get; set; }
        /// <summary>
        /// 优惠价格
        /// </summary>
        public decimal Discount { get; set; }

        /// <summary>
        /// 验签时间
        /// </summary>
        public DateTime? CheckSignTime { get; set; }

        /// <summary>
        /// 设备类型
        /// </summary>
        public SourceAppType AppType { get; set; }
        /// <summary>
        /// 设备类型
        /// </summary>
        public string AppTypeStr
        {
            get
            {
                return this.AppType.GetDisplayString();
            }
        }
        /// <summary>
        /// 操作系统
        /// </summary>
        public SourceOSType OSType { get; set; }
        /// <summary>
        /// 设备类型
        /// </summary>
        public string OSTypeStr
        {
            get
            {
                return this.OSType.GetDisplayString();
            }
        }
        /// <summary>
        /// 付款方
        /// </summary>
        public int Payer { get; set; }
        /// <summary>
        /// 已退款成功
        /// </summary>
        public bool? IsRefund { get; set; }
        /// <summary>
        /// 操作人Id
        /// </summary>
        public long? AdminId { get; set; }
        /// <summary>
        /// 操作人姓名
        /// </summary>
        public string AdminFullName { get; set; }
        /// <summary>
        /// 操作类型
        /// </summary>
        public PaymentOperationType? OperationType { get; set; }
        /// <summary>
        /// 失败备注
        /// </summary>
        public string FailRemark { get; set; }
    }
}
